<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Qwt User&#39;s Guide: QwtAbstractLegend Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Qwt User&#39;s Guide
   &#160;<span id="projectnumber">6.1.3</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_qwt_abstract_legend.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-slots">Public Slots</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_qwt_abstract_legend-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">QwtAbstractLegend Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Abstract base class for legend widgets.  
 <a href="class_qwt_abstract_legend.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="qwt__abstract__legend_8h_source.html">qwt_abstract_legend.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for QwtAbstractLegend:</div>
<div class="dyncontent">
<div class="center"><img src="class_qwt_abstract_legend__inherit__graph.png" border="0" usemap="#_qwt_abstract_legend_inherit__map" alt="Inheritance graph"/></div>
<map name="_qwt_abstract_legend_inherit__map" id="_qwt_abstract_legend_inherit__map">
<area shape="rect" id="node3" href="class_qwt_legend.html" title="The legend widget. " alt="" coords="29,155,120,181"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-slots"></a>
Public Slots</h2></td></tr>
<tr class="memitem:aa9fc80c9e1dcbcfef51b96a3bff268ca"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_abstract_legend.html#aa9fc80c9e1dcbcfef51b96a3bff268ca">updateLegend</a> (const QVariant &amp;itemInfo, const QList&lt; <a class="el" href="class_qwt_legend_data.html">QwtLegendData</a> &gt; &amp;data)=0</td></tr>
<tr class="memdesc:aa9fc80c9e1dcbcfef51b96a3bff268ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update the entries for a plot item.  <a href="#aa9fc80c9e1dcbcfef51b96a3bff268ca">More...</a><br /></td></tr>
<tr class="separator:aa9fc80c9e1dcbcfef51b96a3bff268ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a77092d06decd579fcde5c90875c3830b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_abstract_legend.html#a77092d06decd579fcde5c90875c3830b">QwtAbstractLegend</a> (QWidget *parent=NULL)</td></tr>
<tr class="separator:a77092d06decd579fcde5c90875c3830b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d86d9c50679dea9fefafc457fc70814"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6d86d9c50679dea9fefafc457fc70814"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_abstract_legend.html#a6d86d9c50679dea9fefafc457fc70814">~QwtAbstractLegend</a> ()</td></tr>
<tr class="memdesc:a6d86d9c50679dea9fefafc457fc70814"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a6d86d9c50679dea9fefafc457fc70814"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3656b3d4dcf572c0b4134b9988c975f6"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_abstract_legend.html#a3656b3d4dcf572c0b4134b9988c975f6">renderLegend</a> (QPainter *painter, const QRectF &amp;rect, bool fillBackground) const  =0</td></tr>
<tr class="separator:a3656b3d4dcf572c0b4134b9988c975f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a177cb553f60c0446cdef9e7ace916641"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_abstract_legend.html#a177cb553f60c0446cdef9e7ace916641">isEmpty</a> () const  =0</td></tr>
<tr class="separator:a177cb553f60c0446cdef9e7ace916641"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51e8c45d2afc691e78b09c662d7a493e"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_abstract_legend.html#a51e8c45d2afc691e78b09c662d7a493e">scrollExtent</a> (Qt::Orientation) const </td></tr>
<tr class="separator:a51e8c45d2afc691e78b09c662d7a493e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Abstract base class for legend widgets. </p>
<p>Legends, that need to be under control of the <a class="el" href="class_qwt_plot.html" title="A 2-D plotting widget. ">QwtPlot</a> layout system need to be derived from <a class="el" href="class_qwt_abstract_legend.html" title="Abstract base class for legend widgets. ">QwtAbstractLegend</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Other type of legends can be implemented by connecting to the <a class="el" href="class_qwt_plot.html#acf7bcea83713f73e5914325c50a1c22b">QwtPlot::legendDataChanged()</a> signal. But as these legends are unknown to the plot layout system the layout code ( on screen and for <a class="el" href="class_qwt_plot_renderer.html" title="Renderer for exporting a plot to a document, a printer or anything else, that is supported by QPainte...">QwtPlotRenderer</a> ) need to be organized in application code.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_legend.html" title="The legend widget. ">QwtLegend</a> </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a77092d06decd579fcde5c90875c3830b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QwtAbstractLegend::QwtAbstractLegend </td>
          <td>(</td>
          <td class="paramtype">QWidget *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>NULL</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructor</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>Parent widget </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a177cb553f60c0446cdef9e7ace916641"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool QwtAbstractLegend::isEmpty </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>True, when no plot item is inserted </dd></dl>

<p>Implemented in <a class="el" href="class_qwt_legend.html#a6ff50cb1e388a7da2a59709eef83be20">QwtLegend</a>.</p>

</div>
</div>
<a class="anchor" id="a3656b3d4dcf572c0b4134b9988c975f6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void QwtAbstractLegend::renderLegend </td>
          <td>(</td>
          <td class="paramtype">QPainter *&#160;</td>
          <td class="paramname"><em>painter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QRectF &amp;&#160;</td>
          <td class="paramname"><em>rect</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>fillBackground</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Render the legend into a given rectangle.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">painter</td><td>Painter </td></tr>
    <tr><td class="paramname">rect</td><td>Bounding rectangle </td></tr>
    <tr><td class="paramname">fillBackground</td><td>When true, fill rect with the widget background</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_abstract_legend.html#a3656b3d4dcf572c0b4134b9988c975f6">renderLegend()</a> is used by <a class="el" href="class_qwt_plot_renderer.html" title="Renderer for exporting a plot to a document, a printer or anything else, that is supported by QPainte...">QwtPlotRenderer</a> </dd></dl>

<p>Implemented in <a class="el" href="class_qwt_legend.html#aacc94e890b12b745619c02749628b6ce">QwtLegend</a>.</p>

</div>
</div>
<a class="anchor" id="a51e8c45d2afc691e78b09c662d7a493e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int QwtAbstractLegend::scrollExtent </td>
          <td>(</td>
          <td class="paramtype">Qt::Orientation&#160;</td>
          <td class="paramname"><em>orientation</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Return the extent, that is needed for elements to scroll the legend ( usually scrollbars ),</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">orientation</td><td>Orientation </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Extent of the corresponding scroll element </dd></dl>

<p>Reimplemented in <a class="el" href="class_qwt_legend.html#ad75d747944921533aede5bfce518ec02">QwtLegend</a>.</p>

</div>
</div>
<a class="anchor" id="aa9fc80c9e1dcbcfef51b96a3bff268ca"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void QwtAbstractLegend::updateLegend </td>
          <td>(</td>
          <td class="paramtype">const QVariant &amp;&#160;</td>
          <td class="paramname"><em>itemInfo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QList&lt; <a class="el" href="class_qwt_legend_data.html">QwtLegendData</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span><span class="mlabel">slot</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Update the entries for a plot item. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">itemInfo</td><td>Info about an item </td></tr>
    <tr><td class="paramname">data</td><td>List of legend entry attributes for the item </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_qwt_abstract_legend.html">QwtAbstractLegend</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
